#define _CRT_SECURE_NO_WARNINGS	

int maxDepth(char* s)
{
    int len = strlen(s);
    char* stack = (char*)malloc(len + 1);
    int max = 0;
    int top = 0;
    while (*s != '\0')
    {
        if (*s == '(')
        {
            stack[top++] = '(';
            max = max > top ? max : top;
        }
        if (*s == ')')
            top--;
        s++;
    }
    return max;
}